Php gets the day of a day, the day of the week, and the date corresponding to the day of the week and the day of the week. Php returns the day of a day, the day of a week, and the date $ todaydate (Y-m-d) corresponding to Monday and next Monday.
PHP gets days of the week and dates of Monday and next Monday for this week
$today =date ("y-m-d");
echo $today;//You can get the date today. Output 2014-9-29
Define an array first.
$rows =array ("Day", "one", "two", "three", "four", "five", "
Last Monday
String Getlastmondayyyyymmddhhmmss () {
MonDay =-6;
SimpleDateFormat ("Yyyy-mm-dd 00:00:00"); Set the time format
Calendar resulttime = Calendar.getinstance ();
DayWeek = Resulttime.get (Calendar. Day_of_week);//Gets
First, use your formula to compile a simple program:
Main ()
{Int year;/* year */
Intw;/* day of the week */
Scanf ("% d", & year );
W = (year-1) + (year-1)/4-(year-1)/100 + (year-1)/400 + 1) % 7;
Printf ("% d \ n", W );
Getch ();
}
Enter 1 during
DECLARE @date datetime;
Set @date = GETDATE ()
--Thinking, 1900-01-01 (Monday) plus (given a log of the month of 6th month and 1900-01-01 weeks) week
Why not choose number 7th? If it is number 7th, then 7 is exactly Sunday, the first Monday will
1 ORACLE mid-week related knowledge description 1.1 Date formatting functions To_char (X [,FORMAT]) : Press X toFORMATThe format is converted into a string. X is a date,FORMATis a format string that specifies the format in which X is
usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;namespacewyfclass{ Publicclasstools{/// ///get the first day of the week (first day of Sunday)/// /// /// Publicdatetime Getweekfirstdaysun (datetime datetime) {//Sunday
Transferred from: http://www.cnblogs.com/likwo/archive/2010/04/16/1713282.htmlQuery Day:SELECT * FROM table where to_days (column_time) = To_days (now ());SELECT * FROM table where date (column_time) = Curdate ();Query one week:SELECT * FROM table
Obtain the time from Monday to Sunday of the current week. obtain the time from Monday to Sunday of the current week.
$ Date = new DateTime (); // Time object $ date-> modify ('This Week'); // specify the week, echo $ date-> format ('Y-m-D') on
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.